package com.cf.spider.core.model;

import com.cf.code.core.CField;
import com.cf.code.core.CModel;
import com.cf.code.core.CPage;
import com.cf.crud.entity.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * boot-awm-JobInfo
 *
 * @author <a href="2428922347@qq.com">Zhu mingming</a>
 * @info
 * @since 2018/7/11 上午 09:47
 */
@Entity
@Table(name = "jobInfo")
@CModel(pages = {
        @CPage(title = "抓取列表", path = "jobInfo", templateName = "list.ftl", outPutName = "list.ftl"),
        @CPage(title = "抓取", path = "jobInfo", templateName = "add.ftl", outPutName = "add.ftl"),
        @CPage(title = "抓取", path = "jobInfo", templateName = "update.ftl", outPutName = "update.ftl")
})
public class JobInfo extends BaseEntity {

    /**
     * 任务的名字
     */
    @CField(lab = "任务名字")
    private String name;

    /**
     * 监听队列的名字
     */
    @CField(lab = "任务数据推送队列")
    private String topic;

    /**
     * 授权信息的获取Id
     */
    @Column(name = "authId")
    @CField(lab = "授权获取Id")
    private String authId;

    /**
     * 配置信息：上传的
     */
    @CField(lab = "抓取配置")
    private String config;

    @Override
    public String toString() {
        return "JobInfo{" +
                "name='" + name + '\'' +
                ", topic='" + topic + '\'' +
                ", authId='" + authId + '\'' +
                ", config='" + config + '\'' +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTopic() {
        return topic;
    }

    public void setTopic(String topic) {
        this.topic = topic;
    }

    public String getAuthId() {
        return authId;
    }

    public void setAuthId(String authId) {
        this.authId = authId;
    }

    public String getConfig() {
        return config;
    }

    public void setConfig(String config) {
        this.config = config;
    }
}
